#ifndef __CXHGT_PLAYER_EVENT_H__
#define __CXHGT_PLAYER_EVENT_H__

#include "Expand/Events.h"

using namespace PocketSurvival;

namespace PocketSurvival
{
    class SubsystemTerrain;
    class SubsystemPlayers;
};

namespace CXHGT
{
    class MainCityProtection;

    class PlayerEvent : public IPlayerEvent, public ICreatureEvent, public ISignEvent
    {
    private:
        MainCityProtection *m_mainCityProtection;

        SubsystemTerrain *m_subsystemTerrain;
        SubsystemPlayers *m_subsystemPlayers;

    public:
        PlayerEvent(MainCityProtection * mainCityProtection);
        virtual bool playerPlaceBlock(ComponentPlayer *componentPlayer, const Point3 &point, int32_t placeBlockValue) override;
        virtual bool playerBreakBlock(ComponentPlayer *componentPlayer, const Point3 &point, int32_t digBlockValue, int32_t toolLevel) override;
        virtual bool onUse(ComponentMiner *componentMiner, const Ray3& ray) override;

        virtual bool hitBody(ComponentAttacker* attacker, ComponentBody *body, const Vector3 &hitPosition, const Vector3 &hitDirection) override;
        virtual bool injureEntity(ComponentHealth *health, float amount, entt::entity attackerEntity, bool realInjure, const std::string &cause, InjureType injureType) override;

        virtual bool playerTouchSign(std::shared_ptr<PlayerData> playerData, const Point3 &point) override;
        virtual bool playerEditSign(std::shared_ptr<PlayerData> playerData, SignTextData &signTextData) override;
    };

} // namespace BedWars

#endif
